<template>
	<view class="flex flex-ai-c" style="margin: 20rpx">
		<u-search placeholder="搜索文章" v-model="keyword" :show-action="false" @search="search"></u-search>
		<view style="margin-left:10rpx;" @click="cancel">取消</view>
	</view>
</template>

<script lang="ts" setup>
	import {
		ref
	} from 'vue'
	import {
		onLoad
	} from '@dcloudio/uni-app'
	const emit = defineEmits(['cancel','search'])
	let keyword = ref('')
	
	const cancel = () => {
		emit('cancel')
	}
	const search = () => {
		emit('search', keyword.value)
	}
	onLoad(() => {

	})
</script>

<style>
</style>